package com.alibaba.aone.casestudy.common.entity;

import java.io.Serializable;
import java.util.Comparator;

/**
 * 按DepartId排序
 * 
 * @author xuning.liuxn
 */
public class DepartSortClass implements Serializable, Comparator<Object> {

    private static final long serialVersionUID = 4373106930148712029L;

    public int compare(Object arg0, Object arg1) {

        AoneDepart depart1 = (AoneDepart) arg0;
        AoneDepart depart2 = (AoneDepart) arg1;

        return (depart1.getId() > depart2.getId()) ? 1 : 0;
    }

}
